import { ReactNode } from "react";
import { TASK_KEY } from "@/constants";
export type MenuItems = Array<{
  key: string;
  label: ReactNode;
  icon: ReactNode;
  children?: MenuItems;
}>;

export const menuItems: MenuItems = [
  {
    key: "/management",
    label: "上报管理",
    icon: "上报管理",
  },
  {
    key: "/assets",
    label: "资产管理",
    icon: "资产管理",
    children: TASK_KEY.map((item) => ({
      key: "/" + item.value,
      label: item.label,
      icon: item.label,
    })),
  },
  {
    key: "/upload",
    label: "文件上传",
    icon: "文件上传",
  },
  {
    key: "/data",
    label: "数据管理",
    icon: "数据管理",
    children: [
      {
        key: "/query",
        label: "数据查询",
        icon: "数据查询",
      },
      {
        key: "/log",
        label: "日志数据查询",
        icon: "日志数据查询",
      }
    ]
  },
];
